Xchat docs#257
Merged
Merged
Conversation
…sync Replaces the branch's 21-commit history (which included an accidental site-wide content overlay later reverted) with the intended content re-applied on current main: - xchat/ guide pages (introduction, cryptography primer, getting started, XDK reference, media, groups, real-time events, troubleshooting) carried over from the previous branch head - Chat API product navigation spliced into docs.json (additive only) - openapi.json synced verbatim from the live https://api.x.com/2/openapi.json, which now serves the chat action-signature, error-message, and public-key contract updates
…ract changes Reflect the current Chat API and Chat XDK surface: - conversation-key setup now uses prepare_conversation_key_change (one call: fresh key + participant wraps + signed action signature); the keys endpoint adds or rotates keys and returns the canonical conversation_id alongside sequence_id - group creation uses prepare_group_create and member adds use prepare_group_members_change; both return two action signatures and the docs show sending both - action signatures are required and validated at the API boundary (400 problem-details on malformed input); group endpoints return stable human-readable error messages - public-key responses name the version field public_key_version; every fields list and sample read updated - removed dropped SDK methods (prepare_conversation_keys, sign_add_members, sign_key_change, encrypt_conversation_key_for_recipients) and renamed PreparedConversationKeys to PreparedConversationChange - documented conversation-id form flexibility (colon, hyphen, or bare recipient id all sign identically; URL paths still use hyphens), permanent verification failures, and chunked stream encryption
- teach verify_key_binding before wrapping conversation keys (warnings in Getting Started and the XDK reference, step in Groups) - state the group title/avatar verbatim-match rule: values passed to prepare_group_create are signed and embedded exactly as given, so the POST body must carry byte-identical group_name/group_avatar_url; the encrypted-metadata section explains why a create-time title cannot be ciphertext under the group's own key - point group flows at the batch public-keys route - add rotation semantics: fresh keys on member adds mean new members cannot read earlier versions, rotation never revokes old versions, and rotating after suspected exposure protects future messages only - primer: new 'Signed state changes (action signatures)' section covering what is signed, why the server validates structurally, and where cryptographic verification happens - fix encrypt_reply samples to the real positional signatures and encrypt_message optional-argument names - replace every ellipsis with explicit paths, field lists, example values, or complete code
Fix API-accuracy bugs against the current SDK: streaming is a two-arg raw-bytes call (media_hash_key comes from upload finalize, not encrypt_stream); prepare methods take a single params object/struct in every binding except Python (and the params types dropped the Prepare prefix); decrypt_events .errors is a map, not a list; Go conversation keys are raw bytes, not base64; verification is fail-closed by default. Add the incremental streaming API, the keyVersion-per-event media key selection contract, the three Juicebox config shapes, and the hex utility helpers.
Address code-review findings on the API-accuracy pass: TypeScript encrypt_message/encrypt_reply/reactions take a single params object; Go import_keys takes raw bytes (decode the base64 env var first); Go utility calls honor their (value, error) arities; Java reads the public conversationKey field, not a getter; C#/Java/Rust image-dimension and conversation-key types match the SDK; width/height casts added where narrowing.
State the conversation key as plain raw bytes without phrasing that implies a prior encoding, and remove code comments that only restate a variable's type.
docs(xchat): correct chat-xdk SDK API surface across guides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.